package auction.chapter05.model;

import java.util.HashSet;
import java.util.Set;

public class User_Union{
	private Long id;
	private String name;
	
	private BillingDetails_Union defaultBillingDetails;
	private Set<BillingDetails_Union> billingDetails=new HashSet<BillingDetails_Union>();
	
	public User_Union(){
	}
	
	public User_Union(String s){
		name=s;
	}
	
	
	
	public Long getId(){
		return id;
	}
	public void setId(Long i){
		id=i;
	}
	
	public String getName(){
		return name;
	}
	
	public void setName(String i){
		name=i;
	}
	

	public BillingDetails_Union getDefaultBillingDetails() {
		return defaultBillingDetails;
	}

	public void setDefaultBillingDetails(BillingDetails_Union defaultBillingDetails) {
		this.defaultBillingDetails = defaultBillingDetails;
	}

	public Set<BillingDetails_Union> getBillingDetails() {
		return billingDetails;
	}

	public void setBillingDetails(Set<BillingDetails_Union> billingDetails) {
		this.billingDetails = billingDetails;
	}
	
	public void addBillingDetails(BillingDetails_Union in){
		this.billingDetails.add(in);
		in.setUser(this);
	}
}